Skip to main content
GET
Get accounting rule

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

id
string
required

Unique identifier of the accounting rule.

Example:

"arl_abc123def456"

code
string
required

Auto-generated rule code (e.g. R-001).

Example:

"R-001"

name
string | null
required

Optional user-defined name for the rule.

Example:

"Recurring subscriptions"

ledger_id
string
required

Identifier of the ledger this rule belongs to.

Example:

"led_abc123def456"

category
string | null
required

Rule category (e.g. accounting_software, invoice_posted).

Example:

"accounting_software"

priority
number
required

Override order. Higher priority wins when multiple rules match.

Example:

100

product_ids
string[]
required

Product IDs to match. Empty means match all.

Example:
product_types
string[]
required

Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.

Example:
customer_ids
string[]
required

Customer IDs for customer-specific overrides.

Example:
currencies
enum<string>[]
required

Currency codes to match (e.g. EUR, USD).

Currency code. See ISO 4217.

Available options:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
XOF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
XPF,
NGN,
NIO,
NPR,
OMR,
PAB,
PEN,
PGK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PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PT-20,
PT-30,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SV,
SX,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW
Example:
tax_schemes
enum<string>[]
required

Tax schemes to match. A context without a tax scheme never matches a rule that sets this filter. Empty means match all.

Available options:
standard,
reverse_charge,
exempt,
not_eligible,
manual
Example:
tax_territories
enum<string>[]
required

Tax territory country codes to match. A context without a tax territory never matches a rule that sets this filter. Empty means match all.

Two-letter country code in ISO format. See ISO 3166-1 alpha-2.

Available options:
AD,
AE,
AF,
AG,
AI,
AL,
AM,
AO,
AQ,
AR,
AS,
AT,
AU,
AW,
AX,
AZ,
BA,
BB,
BD,
BE,
BG,
BH,
BI,
BJ,
BL,
BM,
BN,
BO,
BQ,
BR,
BS,
BT,
BF,
BV,
BW,
BY,
BZ,
CA,
CC,
CD,
CF,
CG,
CH,
CI,
CK,
CL,
CM,
CN,
CO,
CR,
CU,
CV,
CW,
CX,
CY,
CZ,
DE,
DJ,
DK,
DM,
DO,
DZ,
EC,
EE,
EG,
EH,
ER,
ES,
ES-CE,
ES-ML,
ET,
FI,
FJ,
FK,
FM,
FO,
FR,
GA,
GB,
GD,
GE,
GF,
GG,
GH,
GI,
GL,
GM,
GN,
GP,
GQ,
GR,
GS,
GT,
GU,
GW,
GY,
HK,
HM,
HN,
HR,
HT,
HU,
IC,
ID,
IE,
IL,
IM,
IN,
IO,
IQ,
IR,
IS,
IT,
JE,
JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KN,
KP,
KR,
KW,
KY,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
LY,
MA,
MC,
MD,
ME,
MF,
MG,
MH,
MK,
ML,
MM,
MN,
MO,
MP,
MQ,
MR,
MS,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NC,
NE,
NF,
NG,
NI,
NL,
NO,
NP,
NR,
NU,
NZ,
OM,
PA,
PE,
PF,
PG,
PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PT-20,
PT-30,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SV,
SX,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW
Example:
tax_rate_classes
enum<string>[]
required

Tax rate classes to match. A context without a tax rate class never matches a rule that sets this filter. Empty means match all.

Available options:
standard_rate,
reduced_rate,
reduced_rate_alt,
super_reduced_rate,
parking_rate,
exempt,
reverse_charge
Example:
coupon_ids
string[]
required

Coupon IDs to match. Empty means match all.

Example:
client_provider_ids
string[]
required

Client provider IDs to match. Empty means match all.

Example:
payment_method_types
enum<string>[]
required

Payment method types to match. Empty means match all.

Available options:
card,
transfer,
transfer_automated,
direct_debit,
direct_debit_ach,
direct_debit_bacs,
apple_pay,
google_pay,
paypal,
stripe_link,
external
Example:
bank_account_ids
string[]
required

Bank account IDs to match. Empty means match all.

Example:
invoice_types
enum<string>[]
required

Invoice kinds to match: invoice or document. Refunds and other standard invoices match as invoice. A context without an invoice, such as a PSP payout, never matches a rule that sets this filter. Empty means match all.

Available options:
invoice,
document
Example:
interval_period
enum<string> | null
required

Billing interval period filter (months, years, etc.).

Available options:
days,
weeks,
quarters,
months,
years,
once,
all
Example:

"months"

interval_count
number | null
required

Billing interval count filter.

Example:

1

custom_property_filters
object[]
required

Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its values (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the suggested_priority returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set payments_clearing_ledger_account_id, as PSP payouts are booked without the invoice. Empty means match all.

Example:
revenue_ledger_account_id
string | null
required

Revenue ledger account ID used for invoice line revenue routing.

Example:

"lac_abc123def456"

deferred_revenue_ledger_account_id
string | null
required

Deferred revenue ledger account ID used before revenue is recognized.

Example:

"lac_abc123def456"

deferred_discount_ledger_account_id
string | null
required

Deferred discount ledger account ID used before discounts are recognized.

Example:

"lac_abc123def456"

contra_revenue_ledger_account_id
string | null
required

Contra revenue ledger account ID used for amounts that reduce revenue.

Example:

"lac_abc123def456"

discount_ledger_account_id
string | null
required

Discount ledger account ID used for recognized discounts.

Example:

"lac_abc123def456"

ar_ledger_account_id
string | null
required

Accounts receivable ledger account ID used for invoice posting.

Example:

"lac_abc123def456"

cash_ledger_account_id
string | null
required

Cash ledger account ID used for payment settlement.

Example:

"lac_abc123def456"

payments_clearing_ledger_account_id
string | null
required

Payments clearing ledger account ID used while payments settle.

Example:

"lac_abc123def456"

output_tax_ledger_account_id
string | null
required

Output tax ledger account ID used for tax liability.

Example:

"lac_abc123def456"

uncollectible_debit_ledger_account_id
string | null
required

Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.

Example:

"lac_abc123def456"

allowance_for_doubtful_accounts_id
string | null
required

Allowance for doubtful accounts ledger account ID, set on credit_note_created rules.

Example:

"lac_abc123def456"

provider_fees_expense_ledger_account_id
string | null
required

Expense ledger account ID debited for payment provider fees when a payment settles.

Example:

"lac_abc123def456"

payment_processing_fees_expense_ledger_account_id
string | null
required

Expense ledger account ID debited for payment processing fees when a payment settles. Takes precedence over provider_fees_expense_ledger_account_id when set by the same or a higher priority rule.

Example:

"lac_abc123def456"

payment_processing_fees_revenue_ledger_account_id
string | null
required

Payment processing fees revenue ledger account ID, set on invoice_settled rules.

Example:

"lac_abc123def456"

customer_credits_ledger_account_id
string | null
required

Customer credits ledger account ID used for credit balances.

Example:

"lac_abc123def456"

rev_rec_method
enum<string> | null
required

Revenue recognition method.

Available options:
none,
point_in_time,
over_time,
usage_based,
milestone,
manual
Example:

"over_time"

rev_rec_granularity
enum<string> | null
required

Recognition period granularity. Used when rev_rec_method is over_time.

Available options:
day,
month,
quarter,
year
Example:

"month"

rev_rec_point_in_time_basis
enum<string> | null
required

Date revenue is recognized on. Used when rev_rec_method is point_in_time.

Available options:
invoice_date,
service_start_date,
service_end_date,
custom_date
Example:

"service_end_date"

discount_recognition_method
enum<string> | null
required

Method used to recognize discounts.

Available options:
immediate,
deferred,
use_net_amount
Example:

"deferred"

journal_id
string | null
required

Journal ID used to route entries in the accounting provider.

Example:

"jou_abc123def456"

entity_type
string | null
required

Entity type the rule applies to.

Example:

"invoice"

created_at
string<date>
required

Timestamp when the rule was created.

updated_at
string<date>
required

Timestamp when the rule was last updated.

revenue_ledger_account
object | null

Expanded revenue ledger account reference when available.